package main

import (
	"fmt"
)
import s "strings"

//给fmt.Println一个短的别名
var p = fmt.Println

func main() {
	p("contains: ", s.Contains("test", "es"))
	p("count: ", s.Count("test", "t"))
	p("hasprefix: ", s.HasPrefix("lanfeng", "lan"))
	p("hassuffix: ", s.HasSuffix("test", "st"))
	p("index: ", s.Index("test", "e"))
	p("join: ", s.Join([]string{"a", "b", "c"}, "-"))
	p("repeat: ", s.Repeat("nanfeng", 5))
	p("replace", s.Replace("nanfeng", "feng", "ting", -1))
	p("replace", s.Replace("foo", "o", "0", -1))
	p("replace: ", s.Replace("foo", "o", "0", 1))
	p("split: ", s.Split("lanfeng_mingquan_shanghai_yangpu", "_"))
	p("toLower: ", s.ToLower("NANFENG"))
	p("ToUpper: ", s.ToUpper("mingquan"))
	p()
	p("len: ", len("hello world"))
	p("char: ", "hello"[3])

}
